/*PZJvlvAaICNkNibyb717zpgH5t6K2ssgqD4YlxsAgSum9JgKN1WKLjTxaaRoT3pN*/
/*
 * @Author: xiahui 
 * @PageInfo: 变更历史
 * @Date: 2019-04-28 09:31:43 
 * @Last Modified by: xiahui
 * @Last Modified time: 2019-07-10 15:53:11
 */
import { PAGECODE, AREA, FIELDS, URL } from '../../constance';
import { showWarningInfo } from '../../../../../scmpub/scmpub/pub/tool/messageUtil';
import { ajax } from 'nc-lightapp-front';
import { getLangByResId } from '../../../../../scmpub/scmpub/pub/tool/multiLangUtil';

export default function(props) {
	let checkArr = props.table.getCheckedRows(AREA.listTableId);
	if (!checkArr || checkArr.length < 1) {
		showWarningInfo(null, getLangByResId(this, '4004PURDAILY-000058')); /* 国际化处理： 请选择数据*/
		return;
	}

	let reqData = {
		pks: [ checkArr[0].data.values[FIELDS.pk_ct_pu].value ],
		pagecode: PAGECODE.cardPagecode
	};

	ajax({
		url: URL.modifyHistory,
		data: reqData,
		success: (res) => {
			if (res.success) {
				this.paneData = res.data;
				this.setState({
					showPane: !this.state.showPane
				});
			}
		}
	});
}

/*PZJvlvAaICNkNibyb717zpgH5t6K2ssgqD4YlxsAgSum9JgKN1WKLjTxaaRoT3pN*/